import http from '@/utils/http';
import request from '@/utils/request';
/*
 *  user
 * */

export async function fetchTenantList(body) {
  return http.get('/sys/tenant/list', body);
}

export async function fetchMenuTree(body) {
  return http.get('/sys/tenant/id', body);
}

export async function fetchMenuTreeByAdmin(body) {
  return http.get('/sys/tenant/menus', body);
}

export async function doAddTenant(body) {
  return http.post('/sys/tenant/add', body);
}

export async function doEditTenant(body) {
  return http.post('/sys/tenant/edit', body);
}

export async function doRemoveList(body) {
  return http.postFormData('/sys/tenant/delete', body);
}

export async function doResetPassword(body) {
  return http.postFormData('/sys/user/restPwd', body);
}

// 停启用
export async function updateStatus(body) {
  return http.post('/sys/tenant/updateStatus', body);
}

export async function getLlmModelList(params){
  return http.get('/sys/tenant/llmModelList', params)
}

export async function getEmbeddingModelList(params){
  return http.get('/sys/tenant/embeddingModelList', params)
}

export async function getAgentModelList(params) {
  return http.get('/sys/tenant/agentList', params)
}

export async function baseInfoDetail(params) {
  return http.get('/sys/tenant/baseInfo', params)
}

export async function baseInfoEdit(params) {
  return http.post('/sys/tenant/editBaseInfo', params)
}

export async function authManageDetail(params) {
  return http.get('/sys/tenant/authMenus', params)
}

export async function authManageEdit(params) {
  return http.post('/sys/tenant/updateAuthMenus', params)
}

export async function resourceLimitationDetail(params) {
  return http.get('/sys/tenant/resourceLimit', params)
}

export async function resourceLimitationEdit(params) {
  return http.post('/sys/tenant/updateResourceLimit', params)
}

export async function adminAccountlist(params) {
  return http.get('/sys/user/getAdminlist', params)
}